package com.yy.wga.income.feign.api;

import com.yy.wga.common.core.dto.Result;
import com.yy.wga.income.feign.request.IncomeOrderListRequest;
import com.yy.wga.income.feign.response.IncomeOrderListResponse;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import javax.validation.Valid;
import java.util.List;

/**
 * 订单收益
 *
 * @author guochao
 * @since 2024-11-12 00:27:45
 */
@FeignClient(name = "IncomeOrderGoodsFeign", url = "https://wga-api.xianrcj.com",
        path = "/api/income/order")
public interface IncomeOrderGoodsFeign {

    /**
     * 获取收益列表
     * @return
     */
    @PostMapping("list")
    Result<List<IncomeOrderListResponse>> list(@RequestBody @Valid IncomeOrderListRequest request);

    /**
     * 订单结算
     * @param orderNo
     * @return
     */
    @PostMapping("orderSettle")
    Result<Boolean> orderSettle(@RequestParam("orderNo") String orderNo);
}
